<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
    <th:block th:include="include :: header('不同共线站数乘客乘坐地铁比例列表')" />
</head>
<body class="gray-bg">
<div class="container-div">
    <div class="row">
        <div class="col-sm-12 search-collapse">
            <form id="formId">
                <div class="select-list">
                    <ul>
                        <li>
                            <p>横坐标：</p>
                            <input type="text" name="number"/>
                        </li>
                        <li>
                            <p>纵坐标：</p>
                            <input type="text" name="beforeit"/>
                        </li>
                        <li>
                            <p>图示类型：</p>
                            <input type="text" name="diagid"/>
                        </li>
                        <li>
                            <p>图示位置：</p>
                            <input type="text" name="localid"/>
                        </li>
                        <li>
                            <p>算法总体数据：</p>
                            <input type="text" name="typeid"/>
                        </li>
                        <li>
                            <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
                            <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
                        </li>
                    </ul>
                </div>
            </form>
        </div>

        <div class="btn-group-sm" id="toolbar" role="group">
            <a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="demo:userate:add">
                <i class="fa fa-plus"></i> 添加
            </a>
            <a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="demo:userate:edit">
                <i class="fa fa-edit"></i> 修改
            </a>
            <a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="demo:userate:remove">
                <i class="fa fa-remove"></i> 删除
            </a>
            <a class="btn btn-warning" href="/demo/show/showRate" target="_blank" shiro:hasPermission="demo:show:showRate">
                <i class="fa fa-download"></i> 可视化
            </a>
        </div>
        <div class="col-sm-12 select-table table-striped">
            <table id="bootstrap-table">
                <thead>
                <tr>
                    <th data-checkbox="true"></th>
                    <th data-formatter="fm_rowIndex" data-align="center">序号</th>
                    <th data-field="number">横坐标</th>
                    <th data-field="beforeit">纵坐标</th>
                    <th data-field="diagid">图示类型</th>
                    <th data-field="localid">图示位置</th>
                    <th data-field="typeid">算法总体数据</th>
                    <th data-formatter="fm_commands" data-width="120px" data-align="center">操作</th>
                </tr>
                </thead>
            </table>
        </div>
    </div>
</div>
<th:block th:include="include :: footer" />
<script th:inline="javascript">
    var editFlag = [[${@permission.hasPermi('demo:userate:edit')}]];
    var removeFlag = [[${@permission.hasPermi('demo:userate:remove')}]];
    var prefix = ctx + "demo/userate";

    $(function() {
        var options = {
            url: prefix + "/list",
            createUrl: prefix + "/add",
            updateUrl: prefix + "/edit/{id}",
            removeUrl: prefix + "/remove",
            exportUrl: prefix + "/export",
            modalName: "不同共线站数乘客乘坐地铁比例",
            uniqueId: "id"
        };
        $.table.init(options);
    });

    //命令
    function fm_commands(value, row, index){
        var actions = [];
        actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> ');
        actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>删除</a>');
        return actions.join('');
    }
</script>
</body>
</html>     actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>删除</a>');
            return actions.join('');
        }
    </script>
</body>
</html>